<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
  
  
  <meta name="description" content="记录个人生活">
  
  <title>
    Git的一些相关问题 |
    
    Gejin_Blog
  </title>
  
    <link rel="shortcut icon" href="/hexo-application/favicon.ico">
    
  
<link rel="stylesheet" href="/hexo-application/css/style.css">

  
  
<link rel="stylesheet" href="/hexo-application/fancybox/jquery.fancybox.min.css">

  
  
<script src="/hexo-application/js/pace.min.js"></script>

<meta name="generator" content="Hexo 5.4.0"><link rel="alternate" href="/hexo-application/atom.xml" title="Gejin_Blog" type="application/atom+xml">
</head>

<body>
  <main class="content">
    <section class="outer">
  <article id="post-Git" class="article article-type-post" itemscope
  itemprop="blogPost" data-scroll-reveal>

  <div class="article-inner">
    
    <header class="article-header">
      

<h1 class="article-title" itemprop="name">
  Git的一些相关问题
</h1>



    </header>
    

    
    <div class="article-meta">
      <a href="/hexo-application/2021/09/02/Git/" class="article-date">
  <time datetime="2021-09-02T07:01:23.535Z" itemprop="datePublished">2021-09-02</time>
</a>
      
    </div>
    

    
    
<div class="tocbot"></div>

    

    <div class="article-entry" itemprop="articleBody">
      
      
      
      <h1 id="Git的一些相关问题"><a href="#Git的一些相关问题" class="headerlink" title="Git的一些相关问题"></a>Git的一些相关问题</h1><h1 id="问题描述"><a href="#问题描述" class="headerlink" title="问题描述"></a>问题描述</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">remote: Support <span class="keyword">for</span> password authentication was removed on August 13, 2021. Please use a personal access token instead.</span><br><span class="line">remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ <span class="keyword">for</span> more information.</span><br><span class="line">fatal: unable to access <span class="string">&#x27;https://github.com/enticejin/python.git/&#x27;</span>: The requested URL returned error: 403</span><br></pre></td></tr></table></figure>

<h1 id="解决办法"><a href="#解决办法" class="headerlink" title="解决办法"></a>解决办法</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#your_token 在github中生成的token</span></span><br><span class="line"><span class="comment">#USERNAME 在GitHub中的用户名（不是你的登录账号）</span></span><br><span class="line"><span class="comment">#REPO 仓库名</span></span><br><span class="line">git remote set-url origin https://&lt;your_token&gt;@github.com/&lt;USERNAME&gt;/&lt;REPO&gt;.git</span><br><span class="line"></span><br><span class="line">例如：</span><br><span class="line"> git remote set-url origin https://xxx@github.com/xxx/xxx.git</span><br></pre></td></tr></table></figure>
<h1 id="问题描述-1"><a href="#问题描述-1" class="headerlink" title="问题描述"></a>问题描述</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git pull origin master</span><br><span class="line">fatal: unable to access <span class="string">&#x27;https://github.com/enticejin/python.git/&#x27;</span>: Failed to connect to github.com port 443: Timed out</span><br></pre></td></tr></table></figure>
<h1 id="解决办法-1"><a href="#解决办法-1" class="headerlink" title="解决办法"></a>解决办法</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git config --global --<span class="built_in">unset</span> git.proxy</span><br></pre></td></tr></table></figure>
<h1 id="问题描述-2"><a href="#问题描述-2" class="headerlink" title="问题描述"></a>问题描述</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">Push failed</span><br><span class="line">	Unable to access <span class="string">&#x27;https://github.com/enticejin/python.git/&#x27;</span>: OpenSSL SSL_read: Connection was reset, errno 10054</span><br></pre></td></tr></table></figure>
<h1 id="解决办法-2"><a href="#解决办法-2" class="headerlink" title="解决办法"></a>解决办法</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git config --global http.sslVerify <span class="string">&quot;false&quot;</span></span><br></pre></td></tr></table></figure>
<h1 id="问题描述-3"><a href="#问题描述-3" class="headerlink" title="问题描述"></a>问题描述</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">Push failed</span><br><span class="line">	Unable to access <span class="string">&#x27;https://github.com/enticejin/python.git/&#x27;</span>: Failed to connect to github.com port 443: Timed out</span><br></pre></td></tr></table></figure>
<h1 id="解决办法-3"><a href="#解决办法-3" class="headerlink" title="解决办法"></a>解决办法</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">出现这种情况一般都是代理出了问题</span><br><span class="line">将C:\Windows\System32\drivers\etc文件夹下的HOSTS文件中的github.com删掉重新push</span><br></pre></td></tr></table></figure>
<h1 id="全部PUSH命令"><a href="#全部PUSH命令" class="headerlink" title="全部PUSH命令"></a>全部PUSH命令</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git add .</span><br><span class="line">git commit -m “your comment”</span><br><span class="line">git push -u origin master -f</span><br></pre></td></tr></table></figure>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://enticejin.github.io/2021/09/02/Git/" data-id="ckt2qs9260001rk6we8w0b4qs" class="article-share-link">
        分享
      </a>
      
    </footer>

  </div>

  
  
<nav class="article-nav">
  
  <a href="/hexo-application/2021/09/02/hexo-Search/" class="article-nav-link">
    <strong class="article-nav-caption">前一篇</strong>
    <div class="article-nav-title">
      
      hexo Search 官方文档
      
    </div>
  </a>
  
  
  <a href="/hexo-application/2021/09/01/hello-world/" class="article-nav-link">
    <strong class="article-nav-caption">后一篇</strong>
    <div class="article-nav-title">Hello World</div>
  </a>
  
</nav>

  

  
  
  
  

</article>
</section>
    <footer class="footer">
  <div class="outer">
    <div class="float-right">
      <ul class="list-inline">
  
  <li><i class="fe fe-smile-alt"></i> <span id="busuanzi_value_site_uv"></span></li>
  
  <li><i class="fe fe-bookmark"></i> <span id="busuanzi_value_page_pv"></span></li>
  
</ul>
    </div>
    <ul class="list-inline">
      <li>Gejin_Blog &copy; 2021</li>
      
        <li>黔ICP备17054916号-2</li>
      
      <li>Powered by <a href="http://hexo.io/" target="_blank">Hexo</a></li>
      <li>theme  <a target="_blank" rel="noopener" href="https://github.com/zhwangart/hexo-theme-ocean">Ocean</a></li>
    </ul>
  </div>
</footer>
  </main>
  <aside class="sidebar">
    <button class="navbar-toggle"></button>
<nav class="navbar">
  
  <div class="logo">
    <a href="/hexo-application/"><img src="/hexo-application/favicon.ico" alt="Gejin_Blog"></a>
  </div>
  
  <ul class="nav nav-main">
    
    <li class="nav-item">
      <a class="nav-item-link" href="/hexo-application/">主页</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/hexo-application/archives">归档</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/hexo-application/gallery">相册</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/hexo-application/about">关于</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link nav-item-search" title="搜索">
        <i class="fe fe-search"></i>
        搜索
      </a>
    </li>
  </ul>
</nav>
<nav class="navbar navbar-bottom">
  <ul class="nav">
    <li class="nav-item">
      <div class="totop" id="totop">
  <i class="fe fe-rocket"></i>
</div>
    </li>
    <li class="nav-item">
      
      <a class="nav-item-link" target="_blank" href="/hexo-application/atom.xml" title="RSS Feed">
        <i class="fe fe-feed"></i>
      </a>
      
    </li>
  </ul>
</nav>
<div class="search-form-wrap">
  <div class="local-search local-search-plugin">
  <input type="search" id="local-search-input" class="local-search-input" placeholder="Search...">
  <div id="local-search-result" class="local-search-result"></div>
</div>
</div>
  </aside>
  
<script src="/hexo-application/js/jquery-2.0.3.min.js"></script>


<script src="/hexo-application/js/jquery.justifiedGallery.min.js"></script>


<script src="/hexo-application/js/lazyload.min.js"></script>


<script src="/hexo-application/js/busuanzi-2.3.pure.min.js"></script>



<script src="/hexo-application/fancybox/jquery.fancybox.min.js"></script>




<script src="/hexo-application/js/copybtn.js"></script>




<script src="/hexo-application/js/tocbot.min.js"></script>

<script>
  // Tocbot_v4.7.0  http://tscanlin.github.io/tocbot/
  tocbot.init({
    tocSelector: '.tocbot',
    contentSelector: '.article-entry',
    headingSelector: 'h1, h2, h3, h4, h5, h6',
    hasInnerContainers: true,
    scrollSmooth: true,
    positionFixedSelector: '.tocbot',
    positionFixedClass: 'is-position-fixed',
    fixedSidebarOffset: 'auto',
  });
</script>


<script src="/hexo-application/js/ocean.js"></script>


  
<script src="/hexo-application/js/search.js"></script>


</body>

</html>